fix lowranceusr4 writer issues (#376)
* fixes for lowraneusr writer for versions >= 4.
use fs_chain_find when looking for FS_LOWRANCEUSR4 data.
and check for nullptr to verify FS_LOWRANCEUSR4 data exists.
* using rounding in lowranceusr lat/lon conversions.
This gives as a chance of usr->gpx->usr matching.
Update gpsbabel generated usr reference files for these
rounding differences.
* fix lowranceusr4 writer issues.
when writing embedded UTF-16LE strings in lowranceusr version >=4
don't inlucde BOM.
don't offset returned values from lowranceusr4_jd_from_timestamp
by 12 hours, thus matching the inverse transformation in
lowranceusr4_get_timestamp.
when writing lowranceusr version >=4 trails output the given number
of mysterious attribute bytes, i.e. 0.
This almost enables a gpx -> usr -> gpx test loop, which is included
but commented in lowranceusr.test.
* fixes to enable lowranceusr v4 round trip testing.
use templates for lowranceusr*_find_desc_from_icon_number
and lowranceusr*_find_icon_number_from_desc.
enhance lowranceusr*_find_icon_number_from_desc to
recongnize icon-n where n is an integer as icon number n.
This is necessary for the v4 round trip test.
declare lowranceusr*_find_desc_from_icon_number to be static
to limit visibilty. Drop const return type.
declare lowranceusr4_find_color_from_icon_number_plus_color_index
to be static to limit visiblity.
* fix new lowranceusr memory leak.